/*
 * @Descripttion:
 * @version:
 * @Author: wangys
 * @Date: 2022-06-08 15:15:23
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
// const Article = () =>
//   import ('@/components/Article.vue')
Vue.use(VueRouter)

const routes = [
  {
    path: '',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('@/views/Home/Home.vue'),
    children: [
      {
        path: '',
        redirect: 'index'
      },
      // 首页
      {
        path: 'index',
        component: () => import('@/views/Index/Index.vue')
      },
      // 分类
      {
        path: 'classify',
        component: () => import('@/views/Classify/Classify.vue'),
        children: [
          { path: '', redirect: 'opertion' },
          {
            path: 'opertion',
            component: () => import('@/views/Classify/Opertion.vue')
          },
          {
            path: 'record',
            component: () => import('@/views/Classify/Record.vue')
          },
          {
            path: 'interview',
            component: () => import('@/views/Classify/Interview.vue')
          },
          {
            path: 'mysql',
            component: () => import('@/views/Classify/Mysql.vue')
          },
          {
            path: 'language',
            component: () => import('@/views/Classify/Language.vue')
          }
        ]
      },
      // 标签
      {
        path: 'message',
        name: 'message',
        component: () => import('@/views/Message/Message.vue')
      },
      // 关于
      {
        path: 'about',
        name: 'about',
        component: () => import('@/views/About/About.vue')
      },
      // 标签
      {
        path: 'tag',
        name: 'tag',
        component: () => import('@/views/Tag/Tag.vue')
      },
      // 日历
      {
        path: 'calendar',
        name: 'calendar',
        component: () => import('@/views/Calendar/index.vue')
      },
      // 工具栏
      {
        path: 'tool',
        name: 'tool',
        component: () => import('@/views/Tool/index.vue')
      },
      // 时间线
      {
        path: 'timeline',
        name: 'timeline',
        component: () => import('@/views/Timeline/index.vue')
      },
      // 文章详情
      {
        path: 'article-details',
        name: 'ArticleDetails',
        component: () => import('@/views/ArticleDetails/index.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
